package com.meritit.config.single;

public class TestSingleton {

	public static void main (String[] args) {
        SingletonThread s = new SingletonThread();
        Thread t1 = new Thread(s);
        t1.start();
        Thread t2 = new Thread(s);
        t2.start();
        Thread t3 = new Thread(s);
        t3.start();
        Thread t4 = new Thread(s);
        t4.start();
        Thread t5 = new Thread(s);
        t5.start();
        Thread t6 = new Thread(s);
        t6.start();
        Thread t7 = new Thread(s);
        t7.start();
        Thread t8 = new Thread(s);
        t8.start();
        Thread t9 = new Thread(s);
        t9.start();
        Thread t10 = new Thread(s);
        t10.start();
        Thread t11 = new Thread(s);
        t11.start();
        
        while(t1.isAlive() || t2.isAlive() || t3.isAlive() || t4.isAlive() || t5.isAlive()
        		 || t6.isAlive() || t7.isAlive() || t8.isAlive() || t9.isAlive() || t10.isAlive()
        		 || t11.isAlive()) {};
        		 
        for(Singleton o : s.sets) {
        	System.out.println(o.getNum());
        }
    }
	
}
